1. Field of the Invention
The present invention relates to a numerical control apparatus which controls a machine tool or the like, in particular, to a conversational numerical control apparatus which creates a machining program on the basis of data inputted in a conversational format or executes the machining program and which executes learning control.
2. Description of the Related Art
When the same command pattern is repeatedly commanded to execute the same operation pattern to perform machining or the like, learning control is performed to improve machining accuracy. In the learning control, one pattern in which the same command pattern is commanded to generate the same operation pattern is defined as one cycle, a position deviation is sampled, and correction data of one cycle is stored on the basis of the position deviation. The correction data in corresponding sampling in the same command pattern is added to a position deviation in the current sampling to perform correction. The learning control is repeatedly executed to sequentially update correction values, so that the position deviation can be finally converged to about “0”. Since the position deviation is converged to about “0”, high machining accuracy can be obtained (for example, see Japanese Patent Application Laid-Open No. 6-309021).
The conventional learning control is applied to only a binary operation in which the same operation pattern is generated. In an operation by a normal NC program (EIA format) (command such as an M code is included in a program, and an operation timing is shifted with an influence caused by execution of a process by the command such as the M code when executing an NC program at each stage), the same operation pattern is not generated even though the same NC program is executed. For this reason, learning control is not applicable to NC programs.
A patent application for a numerical control apparatus in which learning control is applicable to a normal NC program (EIA format) is filed at the Japanese Patent Office (Japanese Patent Application Serial No. 2003-359664). In the patent application, in case where the same command pattern is repeatedly executed to perform machining, a learning control ON command and learning command OFF command which commands a learning control start position and a learning control end position are included in a program in advance (or a command indicating feasibility of learning control is set and stored in advance), and learning control is performed based on the determination as to whether the type of the program command is a command indicating feasibility of learning control, which is set and stored in advance, or not.
However, in the numerical control apparatus proposed in the patent application, a creator of a machining program has to input a command code for commanding a learning control start position and learning control end position in the machining program, or a command indicating feasibility of learning control has to be set and stored in advance. For this reason, it is difficult for programmers to create a machining program for execution of a learning control, unless they are so skilled in machining.